<template>
    <div class="head">
        <img src="../assets/logo.png">
        <div class="con">
            <p>后台管理系统</p>
        </div>
        <el-button type="info" v-if="$store.state.userInfo.username" @click="change" class="quit">退出登录</el-button>
    </div>
</template>

<script>
export default {
    methods: {
        change() {
            this.$store.commit('change');
            this.$router.push('/login')
        }
    }
}
</script>

<style>
img {
    width: 47px;
    float: left;
    margin-top: 10px;
}

.con p {
    color: #fff;
    font-size: 20px;
    margin-left: 30px;
}

.quit {
    position: absolute;
    top: 10px;
    right: 0px;
}

.head {
    position: relative;
}
</style>